package com.mrdeer.iot.processor.impl;

import com.mrdeer.iot.bean.ChannelInfo;
import com.mrdeer.iot.bean.command.Protocol;
import com.mrdeer.iot.bean.enums.ERTUChannelFlag;
import com.mrdeer.iot.processor.IDataProcessor;
import com.mrdeer.iot.processor.ProcessorAbstract;
import io.netty.channel.ChannelHandlerContext;
import lombok.extern.slf4j.Slf4j;

/**
 * @Author: xie jianchu
 */
@Slf4j
public class InvalidProcessor extends ProcessorAbstract implements IDataProcessor {
    public InvalidProcessor() {
        super(ERTUChannelFlag.INVALID);
    }

    @Override
    public void translate(ChannelHandlerContext ctx, ChannelInfo channelInfo, Protocol protocol) throws Exception {
        if (super.getNextProcessor() != null) {
            super.getNextProcessor().translate(ctx, channelInfo, protocol);
        }
    }
}
